<?php
class CategoryController extends AppController {
    public function index(){
        $this->loadModel('News');
        parent::init();
        $slug = $this->params['slug'];
        $news = $this->News->find('all', array(
            'order' => 'News.date DESC',
            'conditions' => array('Category.slug' => $slug),
        ));
        $this->set('slug', $slug);
        $this->set('news', $news);
    }
}